package com.common.BearMethods;

import com.common.BearBean.MemberListBean;
import com.common.cons.Constans;
import com.common.retrofit.base.BaseMethods;
import com.common.utils.SortUtils;

import rx.Observable;
import rx.Subscriber;

public class GetMemberListInfoMethods extends BaseMethods {

    private static GetMemberListInfoMethods m_ins = null;

    public static GetMemberListInfoMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetMemberListInfoMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetMemberListInfoMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "api/Shop/";
    }

    private BearService initService() {
        return getRetrofit().create(BearService.class);
    }


    public void     viplist       (Subscriber<MemberListBean> subscriber,
                      String uid ,
                      String hashid,
                      int    page,
                      String clientcode,
                      String search,
                      String sort_type,
                      String screen_age,
                      String screen_registdate,
                      String screen_paydate,
                      String screen_money,
                      String screen_paynum,
                      String screen_score,
                      String screen_consultant,
                      String screen_notpayday
    ) {
        String time  = System.currentTimeMillis()+"" ;
        Observable observable = initService().viplist (time,
                SortUtils.getMyHash("time"+time,"uid"+uid
                        ,"hashid"+hashid
                        ,"page"+page
                        ,"clientcode"+clientcode
                        ,"search"+search
                        ,"sort_type"+sort_type
                        ,"screen_age"+screen_age
                        ,"screen_registdate"+screen_registdate
                        ,"screen_paydate"+screen_paydate
                        ,"screen_money"+screen_money
                        ,"screen_paynum"+screen_paynum
                        ,"screen_score"+screen_score
                        ,"screen_consultant"+screen_consultant
                        ,"screen_notpayday"+screen_notpayday
                ), Constans.ANDROID_APP_ID,"3",
              uid,hashid,page,clientcode,search,sort_type,screen_age,screen_registdate,screen_paydate,screen_money,screen_paynum,screen_score,screen_consultant,screen_notpayday
        );
        toSubscribe(observable, subscriber);
    }
}
